//
//  SecondScrollCelltwo.m
//  DesighBook
//
//  Created by 梅明 on 15/9/17.
//  Copyright (c) 2015年 梅明. All rights reserved.
//

#import "SecondScrollCelltwo.h"
#import "UIImageView+AFNetworking.h"
#import "DesighModel.h"
#define viewwith self.frame.size.width

@implementation SecondScrollCelltwo

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];


    // Configure the view for the selected state
}

-(void)setimgWithModel:(NSArray *)arr Andindex:(NSInteger)index
{
    _imgview.image = nil;
    DesighModel *model = arr[index];
    [_imgview setImageWithURL:[NSURL URLWithString:model.imgViewurl]];
    _imgview.tag = 100 + index;
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
    [_imgview addGestureRecognizer:tap];
    _imgview.userInteractionEnabled = YES;
  
}

-(void)tap:(UITapGestureRecognizer *)tap
{
    self.block((int)tap.view.tag-100);
}


@end
